package org.BUPT.infrastructure.persistent.DAO;

import org.BUPT.infrastructure.persistent.po.Comment;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentDAO extends CrudRepository<Comment, Integer> {
    Comment findCommentByCommentIdAndIsDel(int id,int isDel);
    List<Comment> findAllByAnswerIdAndParentIdEqualsAndIsDel(int answerId, int parentId,int isDel);
    List<Comment> findAllByParentIdAndIsDel(int parentId,int isDel);

}
